﻿<%@ Page Language="C#" MasterPageFile="~/Game/Game.Master" AutoEventWireup="true"
    CodeBehind="Science.aspx.cs" Inherits="smallDeimos.Game.Science" Title="Small Deimos - Sciences" %>

<%@ Register TagPrefix="SD" Namespace="smallDeimos.Game.Controls" Assembly="smallDeimos" %>
<asp:Content ID="Content3" runat="server" ContentPlaceHolderID="head">
    <%--    <script type="text/javascript" src="../jquery-1.2.6.min.js" />
--%>

    <script type="text/javascript" src="../jquery.progressbar.js" />

    <script type="text/javascript">
$().ready(function() {
$("#spaceused1").progressBar();

    $("#BioBar").progressBar(30, { barImage: '../progressbg_green.gif'} );
});
    </script>

    <style type="text/css">
        .progressBar
        {
        }
        .style5
        {
            width: 128px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <span class="progressBar" id="spaceused1">25%</span>
    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label><br />
    <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label><br />
    <asp:Label ID="Label3" runat="server" Text="Label"></asp:Label><br />
    <asp:DataList ID="DataList1" runat="server" DataSourceID="ObjectDataSource1" 
        OnItemDataBound="DataList1_ItemDataBound">
        <ItemTemplate>
            <table cellspacing="5">
                <tr>
                    <th>
                    </th>
                    <th>
                        Actual value
                    </th>
                    <th>
                        Remaining time
                    </th>
                    <th>
                    </th>
                </tr>
                <tr>
                    <td class="style5">
                        Scaners:
                    </td>
                    <td>
                        <asp:Label ID="BiologyLabel" runat="server" Text='<%# Eval("Biology", " {0:F3}") %>' /><%--BackColor='<%# ColorForActiveScience("Biology") %>'--%>
                    </td>
                    <td>
                        <span class="progressBar" id="BioBar">10%</span>
                        <asp:Label ID="Label12" runat="server" Text='<%# RemainingTimeForScience(Eval("Biology")) %>' />
                    </td>
                    <td>
                        <asp:Button ID="Button2" runat="server" Font-Size="X-Small" Height="19px" Text="Select"
                            OnClick="Button2_Click" />
                    </td>
                </tr>
                <tr>
                    <td class="style5">
                        Economy:
                    </td>
                    <td>
                        <asp:Label ID="EconomyLabel" runat="server" Text='<%# Eval("Economy", " {0:F3}") %>' />
                    </td>
                    <td>
                        <asp:Label ID="Label4" runat="server" Text='<%# RemainingTimeForScience(Eval("Economy")) %>' />
                    </td>
                    <td>
                        <asp:Button ID="Button3" runat="server" Font-Size="X-Small" Height="19px" Text="Select"
                            OnClick="Button3_Click" />
                    </td>
                </tr>
                <tr>
                    <td class="style5">
                        Energy:
                    </td>
                    <td>
                        <asp:Label ID="EnergyLabel" runat="server" Text='<%# Eval("Energy", " {0:F3}") %>' />
                    </td>
                    <td>
                        <asp:Label ID="Label5" runat="server" Text='<%# RemainingTimeForScience(Eval("Energy")) %>' />
                    </td>
                    <td>
                        <asp:Button ID="Button4" runat="server" Font-Size="X-Small" Height="19px" Text="Select"
                            OnClick="Button4_Click" />
                    </td>
                </tr>
                <tr>
                    <td class="style5">
                        Math:
                    </td>
                    <td>
                        <asp:Label ID="MathLabel" runat="server" Text='<%# Eval("Math", " {0:F3}") %>' />
                    </td>
                    <td>
                        <asp:Label ID="Label6" runat="server" Text='<%# RemainingTimeForScience(Eval("Math")) %>' />
                    </td>
                    <td>
                        <asp:Button ID="Button5" runat="server" Font-Size="X-Small" Height="19px" Text="Select"
                            OnClick="Button5_Click" />
                        <br />
                    </td>
                </tr>
                <tr>
                    <td class="style5">
                        Physics:
                    </td>
                    <td>
                        <asp:Label ID="PhysicsLabel" runat="server" Text='<%# Eval("Physics", " {0:F3}") %>' />
                    </td>
                    <td>
                        <asp:Label ID="Label7" runat="server" Text='<%# RemainingTimeForScience(Eval("Physics")) %>' />
                    </td>
                    <td>
                        <asp:Button ID="Button6" runat="server" Font-Size="X-Small" Height="19px" Text="Select"
                            OnClick="Button6_Click" />
                    </td>
                </tr>
                <tr>
                    <td class="style5">
                        Social:
                    </td>
                    <td>
                        <asp:Label ID="SocialLabel" runat="server" Text='<%# Eval("Social", " {0:F3}") %>' />
                    </td>
                    <td>
                        <asp:Label ID="Label8" runat="server" Text='<%# RemainingTimeForScience(Eval("Social")) %>' />
                    </td>
                    <td>
                        <asp:Button ID="Button7" runat="server" Font-Size="X-Small" Height="19px" Text="Select"
                            OnClick="Button7_Click" />
                    </td>
                </tr>
                <tr>
                    <td class="style5">
                        CurrentCulture:
                    </td>
                    <td colspan="1">
                        <asp:Label ID="CurrentCultureLabel" runat="server" Text='<%# Eval("CurrentCulture", " {0:F3}") %>' />
                    </td>
                    <td colspan="1">
                        <asp:Label ID="Label9" runat="server" Text='<%# RemainingTimeForCulture(Eval("CurrentCulture")) %>' />
                    </td>
                    <td>
                    </td>
                </tr>
            </table>
        </ItemTemplate>
    </asp:DataList>
    <br />
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        SelectMethod="GetSciences" TypeName="SD.Database.DataAccess">
        <SelectParameters>
            <asp:CookieParameter CookieName="sd_id" Name="pId" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    &nbsp;<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:smallDeimosConnectionString %>"
        SelectCommand="SELECT Biology, Economy, Energy, Math, Physics, Social, CurrentCulture FROM Players WHERE (PlayerId = @PlayerId)">
        <SelectParameters>
            <asp:CookieParameter CookieName="sd_id" Name="PlayerId" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>
